<template>
<div class="content">
  <div class="popWindow" v-if="pop!=0" @click="pop=0">
    <div class="qrCodePop" @click.stop>
      <img v-if="isWeiXin()" src="~@img/wxQrCode.png"/>
      <img v-else src="~@img/qqQrCode.png"/>
    </div>
  </div>
  <header>
    <div class="user">
      <img :src="dataShow.face"/>
      <p>{{dataShow.nickname}}</p>
    </div>
    <dl class="data">
      <dd>
        <em>{{ dataShow.amount }}</em>
        <p>助力总金额</p>
      </dd>
      <dd>
        <em>{{dataShow.num}}</em>
        <p>助力总人数</p>
      </dd>
    </dl>
  </header>
  <ul class="list">
    <li v-for="item in dataShow.list">
      <div class="info">
        <div class="num">
          <em>{{item.money}}</em>
          助学金
        </div>
        <div class="date">{{item.addtime}} 兑换</div>
      </div>
      <button class="btnStyle btn1" @click="pop=1">去使用</button>
    </li>
  </ul>
</div>
</template>

<script>
export default{
  data(){
    return{
      pop:0,
      dataShow:''
    }
  },
  mounted(){
    this.dataShowFn();
  },
  methods:{
    dataShowFn(){
      this.api.helplist().then(res=>{
        this.dataShow=res.data.data;
      });
    }
  }
}
</script>

<style lang="scss" type="text/scss" scoped>
.content{
  padding:0 0 40px;
  .qrCodePop{
    width:500px;
    img{
      width:100%;
      border-radius:30px;
    }
  }
  header{
    height:426px;
    background:url($imgUrl+'orderHeader.png') top;
    background-size:100% auto;
    display:flex;
    flex-direction:column;
    justify-content: center;
    align-items: center;
    .user{
      img{
        width:100px;
        height:100px;
        border-radius:50%;
        border:4px solid #FFF;
      }
      p{
        font-size:32px;
        margin-top:18px;
      }
    }
    .data{
      margin-top:30px;
      border-top:1px solid rgba(#89A2C5,0.3);
      display:flex;
      dd{
        width:300px;
        em{
          display:block;
          padding-top:20px;
          font-size:40px;
        }
        p{
          font-size:20px;
          color:#C4C4C4;
        }
      }
    }
  }
  .list{
    width:680px;
    margin:auto;
    li{
      margin-bottom:30px;
      border:1px solid rgba(#89A2C5,0.3);
      border-radius:30px;
      padding:0 40px;
      height:160px;
      box-shadow: 0px 6px 20px 0px rgba(137,162,197,0.10);
      display:flex;
      align-items: center;
      &:before{
        margin-right:25px;
        content:'';
        width:59px;
        height:54px;
        background:url($imgUrl+'orderIco.png');
        background-size:100% 100%;
      }
      .info{
        flex:1;
        text-align:left;
        .num{
          color:$c02;
          font-size:24px;
          em{
            font-size:50px;
            line-height:1;
          }
        }
        .date{
          color:#999;
        }
      }
      .btnStyle.btn1{
        width:140px;
        height:60px;
        font-size:24px;
        font-weight: bold;
        &:after{
          display:inline-block;
          margin-left:5px;
          content:'';
          width:12px;
          height:20px;
          background:url($imgUrl+'enterIco.png');
          background-size:100% 100%;
        }
      }
    }
  }
}
</style>
